package cn.com.tbshuda.websocket.controller;

import cn.com.tbshuda.websocket.service.SendMessages;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author: wsd
 * @date: 2021/5/11 10:45
 */

@Slf4j
@RestController
@RequestMapping("/socket")
public class WebSocketController {

    @Autowired
    private SendMessages sendMessages;

    @GetMapping("/getSocket")
    public String getSocket(){
        sendMessages.sendOneMessage();
        return "success";
    }

}
